package com.zyz.G_常用类.字符串;

/**
 * @author: vick
 * @Date: 2025/3/19
 * @Description:
 * @version: 1.0
 */
public class Demo4 {
    public static void main(String[] args) {
        String str1 = "   abcEd   ";
        //去除两边空格
        String trim = str1.trim();
        System.out.println(trim);

        //拼接
        String ssss = str1.concat("ssss");
        System.out.println(ssss);

        String str2 = "helloworld";
        //是否以ld结尾
        boolean b = str2.endsWith("ld");
        System.out.println(b);

        //判断字符串是否存在
        boolean ld = str2.contains("ld");
        System.out.println(ld);
    }
}
